Documents, such as books, magazines, etc., are increasingly being distributed in an electronic manner. For example, books distributed electronically are commonly referred to as electronic books. The terminology electronic document is used herein to refer to any type of document that is stored and/or distributed in an electronic manner. Such so-called electronic documents can be viewed on general-purpose desktop and laptop computers as well as other devices, such as personal digital assistants (PDA's), palmtop computers, hand-held computers, set-top boxes for television sets, etc. Furthermore one type of device on which electronic documents can be viewed is referred to as an electronic book device, which is a specialized device designed for the reading of electronic documents.
For such electronic documents to be viewable they typically we initially paginated, where each page of the document may, for example, correspond to what is viewable on the screen of a target device. The documents may be statically paginated specifically for a particular device, or dynamically paginated, so that the documents are not specific to a particular device. An example of the latter is described in the cofiled, coassigned and copending patent application entitled “Dynamic Pagination for Electronic Documents” Ser. No. 09/410,414.
A disadvantage associated with pagination of electronic documents is that while the process of paginating does divide a document into its constituent pages, each of these pages may not be visually optimal for viewing purposes. For example dynamic pagination as described in the patent application referenced in the preceding paragraph is a greedy, one-pass process. That is, it is first determined the maximum number of words that can fit in one “slot” of the page, and then it is determined the maximum number of words that can fit in the next slot, et seq. The process is greedy in that the maximum number of words that can fit in one slot is always fit into this slot—there is no determination if, for example, the last word in a first slot would look better if it were in the next slot. This also means that the process is a one-pass process, in that once a slot has been fit within a maximum number of words, the process does not go back to that slot again in the context of dynamic pagination.
This can result in the layout of words within consecutive slots that is less than visually appealing, however. For example, in the page 500 of FIG. 1, two specific slots are shown, slot 502 and slot 504. The slot 502 has words 506, 508 and 510 inserted therein, while the slot 504 has the word 512 inserted therein, as a result of a greedy, one-pass dynamic pagination process. That is, the process determined that word 510 (a small word) could fit in the same slot as the words 506 and 508, so it inserted the word 510 into the slot 502. However, when the process proceeded to slot 504, it determined that only the word 512 could fit therein, perhaps because the next word (not shown in FIG. 1) was a long word. This results in a visually unappealing group of consecutive lines (where in the context of page balancing a line refers to the text within a given slot), in that the line including words 506, 508 and 510 is much longer than the line including just word 512.
Changing the layout of words on a page, however, can result in the pagination of the document of which the page is a part to be skewered as well. For example, a last word or words from one page may be forced onto the next page, or a first word or words from one page may be forced onto the previous page. By skewering the pagination of the document, however, any indexing or other processes that may have already been performed with respect to the document and its previous pagination must be reperformed. This is disadvantageous, and may result in a page being displayed as it is originally paginated, without any adjustment for visual optimality purposes. For these and other reasons, therefore, there is a need for the present invention.